
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[ArchiveReportInsert]
    @UserId INT ,
    @TemplateId INT ,
    @Name VARBINARY(MAX) ,
    @Id INT OUTPUT
AS 
    BEGIN
        INSERT  INTO ArchiveReport
                ( UserId ,
                  TemplateId ,
                  Name ,
                  DateCreated ,
                  Deleted
                )
        VALUES  ( @UserId ,
                  @TemplateId ,
                  @Name ,
                  GETDATE() ,
                  0
                )
        SET @Id = SCOPE_IDENTITY()
    END
GO
